import { Request, Response } from 'express'
import roleMenusServer from '../../service/roleMenusService'

class RoleMenusController {
  // 根据 role 查找菜单
  async findMenusByRole(req: Request, res: Response) {
    const { role } = req.params
    const menus = await roleMenusServer.findByRole(parseInt(role))
    res.gsmd(menus)
  }
}

export default new RoleMenusController()